
** Marinov_AJPS05
use "marinov_ldpaper.dta", clear

merge m:1 ccode using cites.dta, gen(m1)
drop if m1==2


gen cites = year>=citesyr
gen study = ""
foreach n in orig noth fe time fet ct yfe cyfe {
gen method_`n' = ""
gen dv_`n' = ""
gen b_cites_`n' = .
gen se_cites_`n'= .
gen pval_cites_`n' = .
gen lo_cites_`n'=.
gen hi_cites_`n'=.
gen N_cites_`n'=.
}
gen studynum=.
gen timetrend=""
qui do cites.do
local ii = 1

*Table2: Effect of Economic Pressure on Leader's Survival in Office
*Table2: Full model
* Model 1
xtlogit fail cites sanctionsl1 forcel1 growthpc lngdppc democl1 democlnt mixedl1 mixedlnt age ot3 _s*, fe
cites `ii' orig
logit fail cites sanctionsl1 forcel1 growthpc lngdppc democl1 democlnt mixedl1 mixedlnt age , cl(ccode)
cites `ii' noth
xtlogit fail cites sanctionsl1 forcel1 growthpc lngdppc democl1 democlnt mixedl1 mixedlnt age , fe
cites `ii' fe
logit fail cites sanctionsl1 forcel1 growthpc lngdppc democl1 democlnt mixedl1 mixedlnt age ot3 _s*, cl(ccode)
cites `ii' time
xtlogit fail cites sanctionsl1 forcel1 growthpc lngdppc democl1 democlnt mixedl1 mixedlnt age ot3 _s*, fe
cites `ii' fet
logit fail cites sanctionsl1 forcel1 growthpc lngdppc democl1 democlnt mixedl1 mixedlnt age i.ccode#c.year ot3 _s*, cl(ccode)
cites `ii' ct
clogit fail cites sanctionsl1 forcel1 growthpc lngdppc democl1 democlnt mixedl1 mixedlnt age , group(year) vce(cl year)
cites `ii' yfe
xtreg fail cites sanctionsl1 forcel1 growthpc lngdppc democl1 democlnt mixedl1 mixedlnt age i.year , fe vce(cl ccode)
cites `ii' cyfe
replace studynum = `ii' if _n==`ii'   
replace timetrend = "splines" if _n==`ii'   

local ii=`ii'+1
*Table2: Omitting economic growth
* model 2
xtlogit fail cites sanctionsl1 forcel1 lngdppc democl1 democlnt mixedl1 mixedlnt age ot3 _s*, fe
cites `ii'  orig
logit fail cites sanctionsl1 forcel1 lngdppc democl1 democlnt mixedl1 mixedlnt age ,cl(ccode)
cites `ii' noth
xtlogit fail cites sanctionsl1 forcel1 lngdppc democl1 democlnt mixedl1 mixedlnt age , fe
cites `ii' fe
logit fail cites sanctionsl1 forcel1 lngdppc democl1 democlnt mixedl1 mixedlnt age ot3 _s*, cl(ccode)
cites `ii' time
xtlogit fail cites sanctionsl1 forcel1 lngdppc democl1 democlnt mixedl1 mixedlnt age ot3 _s*, fe
cites `ii' fet
logit fail cites sanctionsl1 forcel1 lngdppc democl1 democlnt mixedl1 mixedlnt age i.ccode#c.year ot3 _s*, cl(ccode)
cites `ii' ct
clogit fail cites sanctionsl1 forcel1 lngdppc democl1 democlnt mixedl1 mixedlnt age , group(year) vce(cl year)
cites `ii' yfe
xtreg fail cites sanctionsl1 forcel1 lngdppc democl1 democlnt mixedl1 mixedlnt age i.year , fe vce(cl ccode)
cites `ii' cyfe
replace studynum = `ii' if _n==`ii'   
replace timetrend = "splines" if _n==`ii'   
local ii=`ii'+1
*Table2: Omitting economic growth, adding sanctions interactions
* Model 3
xtlogit fail cites sanctionsl1 xdemocl1 xlngdptl1 xcost xinstl1 forcel1 lngdppc democl1 democlnt mixedl1 mixedlnt age ot3 _s*, fe
cites `ii'  orig
logit fail cites sanctionsl1 xdemocl1 xlngdptl1 xcost xinstl1 forcel1 lngdppc democl1 democlnt mixedl1 mixedlnt age , cl(ccode)
cites `ii' noth
xtlogit fail cites sanctionsl1 xdemocl1 xlngdptl1 xcost xinstl1 forcel1 lngdppc democl1 democlnt mixedl1 mixedlnt age , fe
cites `ii' fe
logit fail cites sanctionsl1 xdemocl1 xlngdptl1 xcost xinstl1 forcel1 lngdppc democl1 democlnt mixedl1 mixedlnt age ot3 _s*, cl(ccode)
cites `ii' time
xtlogit fail cites sanctionsl1 xdemocl1 xlngdptl1 xcost xinstl1 forcel1 lngdppc democl1 democlnt mixedl1 mixedlnt age ot3 _s*, fe
cites `ii' fet
logit fail cites sanctionsl1 xdemocl1 xlngdptl1 xcost xinstl1 forcel1 lngdppc democl1 democlnt mixedl1 mixedlnt age i.ccode#c.year ot3 _s*, cl(ccode)
cites `ii' ct
clogit fail cites sanctionsl1 xdemocl1 xlngdptl1 xcost xinstl1 forcel1 lngdppc democl1 democlnt mixedl1 mixedlnt age , group(year) vce(cl year)
cites `ii' yfe
xtreg fail cites sanctionsl1 xdemocl1 xlngdptl1 xcost xinstl1 forcel1 lngdppc democl1 democlnt mixedl1 mixedlnt age i.year , fe vce(cl ccode)
cites `ii' cyfe
replace studynum = `ii' if _n==`ii'   
replace timetrend = "splines" if _n==`ii'   
local ii=`ii'+1
replace study = "Marinov" if studynum~=. 	

keep study-timetrend
drop if studynum==.
compress
save marinov.dta , replace

